/* shop.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Courier New', monospace;
}

body {
    background-color: #0a0a14;
    color: #e0e0ff;
    height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 赛博背景效果 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 100, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 0, 150, 0.1) 0%, transparent 40%),
        linear-gradient(to bottom, #0a0a14 0%, #050510 100%);
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    opacity: 0.5;
}

.cyber-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 状态栏 */
.status-bar {
    display: flex;
    justify-content: space-between;
    background: rgba(10, 15, 40, 0.8);
    border: 1px solid #00aaff;
    border-radius: 4px;
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.status-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00aaff, transparent);
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% { left: -100%; }
    100% { left: 100%; }
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-label {
    color: #a0a0ff;
    font-size: 0.9rem;
}

.status-value {
    color: #00ffcc;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-value.warning {
    color: #ffaa00;
}

.status-value.connected {
    color: #00ff88;
}

/* 标题和余额部分 */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(15, 20, 45, 0.7);
    border: 1px solid #6600ff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(102, 0, 255, 0.3);
}

.cyber-title {
    font-size: 2.5rem;
    background: linear-gradient(90deg, #00aaff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
    letter-spacing: 1px;
}

.cyber-subtitle {
    font-size: 1.2rem;
    color: #a0a0ff;
}

.balance-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

.balance-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid #00ffcc;
}

.balance-label {
    color: #a0a0ff;
    font-size: 1.1rem;
}

.balance-amount {
    color: #00ffcc;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.7);
}

.currency-unit {
    color: #ffaa00;
    font-weight: 600;
    font-size: 1.1rem;
}

/* 按钮样式 */
.cyber-button {
    position: relative;
    background: linear-gradient(135deg, #0066cc, #6600ff);
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 28px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.cyber-button:hover {
    box-shadow: 0 0 20px rgba(102, 0, 255, 0.7);
    transform: translateY(-2px);
}

.cyber-button:active {
    transform: translateY(1px);
}

.button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.cyber-button:hover .button-glow {
    left: 100%;
}

.recharge-btn {
    background: linear-gradient(135deg, #ff3366, #ff00ff);
}

/* 商品列表容器 */
.products-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    background: rgba(15, 20, 45, 0.5);
    border: 1px solid #4444ff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(68, 68, 255, 0.2);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(68, 68, 255, 0.5);
}

.selection-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid #00ffcc;
}

.indicator-text {
    color: #a0a0ff;
    font-size: 1rem;
}

.indicator-value {
    color: #00ffcc;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 0 5px rgba(0, 255, 204, 0.7);
}

/* 商品列表区域 */
.product-list-container {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    border: 1px solid rgba(68, 68, 255, 0.3);
    border-radius: 6px;
    background: rgba(10, 15, 30, 0.6);
}

.product-list {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    padding: 5px;
}

/* 商品项 - 列表样式 */
.product-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(20, 25, 60, 0.8);
    border: 1px solid #4444ff;
    border-radius: 6px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    min-height: 90px;
}

.product-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 170, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.product-item:hover {
    transform: translateX(5px);
    border-color: #00aaff;
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.3);
}

.product-item:hover::before {
    opacity: 1;
}

.product-item.selected {
    border-color: #00ffcc;
    background: rgba(20, 40, 70, 0.9);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.4);
    transform: translateX(10px);
}

.product-item.selected::before {
    opacity: 1;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 204, 0.2), transparent);
}

.product-item.selected::after {
    content: "▶";
    position: absolute;
    right: 15px;
    color: #00ffcc;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.7);
}

.product-icon {
    width: 60px;
    height: 60px;
    margin-right: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #4444ff;
    flex-shrink: 0;
}

.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #00ccff;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.product-description {
    color: #a0a0ff;
    font-size: 0.9rem;
    line-height: 1.4;
}

.product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    margin-left: 20px;
    min-width: 120px;
}

.price-amount {
    color: #00ffcc;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.buy-btn {
    background: linear-gradient(135deg, #00aa44, #00cc88);
    padding: 8px 16px;
    font-size: 0.9rem;
    min-width: 80px;
}

.buy-btn:disabled {
    background: linear-gradient(135deg, #555555, #888888);
    cursor: not-allowed;
    opacity: 0.6;
}

.buy-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 列表控制按钮 */
.list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.control-btn {
    flex: 1;
    background: linear-gradient(135deg, #333366, #660099);
    padding: 12px;
}

.buy-selected-btn {
    flex: 2;
    background: linear-gradient(135deg, #00aa44, #00cc88);
}

.buy-selected-btn:disabled {
    background: linear-gradient(135deg, #555555, #888888);
    cursor: not-allowed;
    opacity: 0.6;
}

/* 交易记录部分 */
.transaction-section {
    background: rgba(15, 20, 45, 0.7);
    border: 1px solid #ff3366;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.2);
    flex-shrink: 0;
    max-height: 200px;
    overflow-y: auto;
}

.section-title {
    font-size: 1.5rem;
    color: #ff3366;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-subtitle {
    font-size: 1rem;
    color: #a0a0ff;
}

.transaction-log {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-entry {
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.log-entry.system {
    background: rgba(0, 100, 255, 0.1);
    border-left: 3px solid #00aaff;
}

.log-entry.purchase {
    background: rgba(0, 255, 150, 0.1);
    border-left: 3px solid #00ff99;
}

.log-time {
    color: #00ffcc;
    margin-right: 15px;
}

.log-text {
    color: #e0e0ff;
}

/* 通知弹窗 */
.cyber-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 350px;
    background: rgba(10, 15, 40, 0.95);
    border: 1px solid #00ffcc;
    border-radius: 6px;
    padding: 0;
    box-shadow: 0 0 25px rgba(0, 255, 204, 0.5);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.notification-content {
    padding: 20px;
}

.notification-text {
    color: #00ffcc;
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
    margin-bottom: 15px;
}

.notification-progress {
    height: 3px;
    background: linear-gradient(90deg, #00ffcc, #00aaff);
    width: 100%;
    animation: progressShrink 3s linear forwards;
}

@keyframes progressShrink {
    0% { width: 100%; }
    100% { width: 0%; }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00aaff, #6600ff);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00ccff, #9900ff);
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .balance-section {
        width: 100%;
        justify-content: space-between;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .selection-indicator {
        width: 100%;
    }
    
    .product-item {
        flex-wrap: wrap;
        height: auto;
        padding: 12px;
    }
    
    .product-price {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .price-amount {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .cyber-container {
        padding: 15px;
    }
    
    .cyber-title {
        font-size: 2rem;
    }
    
    .status-bar {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .list-controls {
        flex-direction: column;
    }
    
    .cyber-notification {
        width: calc(100% - 40px);
        right: 10px;
        left: 10px;
    }
    
    .product-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .product-info {
        width: 100%;
        margin-bottom: 10px;
    }
}